package org.spring.boot.sample.activemq;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

@Component
public class ComsumerService {

	@JmsListener(destination = "sample.queue", containerFactory = "jmsListenerContainerQueue")
	public void receiveQUeue(String msg){
		System.out.println("Queue: " + msg);
	}
	
	@JmsListener(destination = "sample.topic", containerFactory = "jmsListenerContainerTopic")
	public void receiveTopic(String msg){
		System.out.println("Topic: " + msg);
	}
}
